package com.zoe.thread.th11_线程池;

import com.zoe.thread.th12_线程池自定义.MyThreadPoolDemo;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Author Zoe
 * @Date: 2021/05/05
 * @Description 固定线程池中的线程数量
 */
public class MyThreadPoolDemo_newFixedThreadPool {
    public static void main(String[] args) {
        // 一个池子受理5个线程，相当于一个银行里面有5个窗口
        ExecutorService executorService = Executors.newFixedThreadPool(5);

        MyThreadPoolDemo.threadPool(executorService);
    }
}
